<?php

class Library_model extends CI_Model{
    
    public function get_all_city(){
        $this->db->select("id , name")->from('provine')->order_by("name"); 
        return $this->db->get()->result_array();  
    }
    
    public function get_district_by_city( $city ){
        $this->db->select("id , name")->from('district')->where(array('provine' => $city))->order_by("name"); 
        return $this->db->get()->result_array(); 
    }
}
